﻿#ifndef _GAME_H
#define _GAME_H
#include<Windows.h>
#include<d3d9.h>
#include<d3dx9.h>
#include <time.h>
#include <stdio.h>
#include "Turret.h"
#include "SuperTurret.h"

#include "dxGraphics.h"
#include "Contra.h"
#include "Background.h"
#include "WeaponCapsule.h"
#include "SpriteManager.h"
#include "Sound.h"

#include "EnemyWhite.h"
#include "EnemyRed.h"

#include "ExplosionManager.h"

#define KEY_DOWN(vk_key)((GetAsyncKeyState(vk_key) & 0x8000) ? 1 : 0)
#define MAX_TURRET 5
#define MAX_SUPER_TURRET 3
#define MAX_WEAPON_CAPSULE 4

class CGame : public dxGraphics
{
private:
	LPDIRECT3DSURFACE9 _surface;
	LPD3DXSPRITE _spriteHandler;
	DWORD start;

	CContra *_contra;
	CBackground *_background;
	CTurret *_turret[MAX_TURRET];
	CSuperTurret *_superTurret[MAX_SUPER_TURRET];
	CWeaponCapsule *_capsule[MAX_WEAPON_CAPSULE];

	CEnemy_White * _EnemyWhite;
	CEnemyRed * _EnemyRed;
	Sound _sound;
public:
	CGame(void);
	int Game_Init(HINSTANCE hInstance, HWND hWnd);
	void Game_Run(HWND hWnd);
	void Game_End(HWND hWnd);
	~CGame();
};

#endif